#encoding:utf-8

from pojo.entity.BaseEntity import BaseEntity

class StrategyRecommendOrder(BaseEntity):
    id=None
    realTransactionId=None
    tradeDate=None

    quotationTime=None
    totalBalance=None

    symbol=None
    market=None
    recommendPos=None
    recommendBalance=None
    price=None
    recommendVol=None
    standardVol=None

    status=None

    entryTime = None  # 更新时间  yyyy-MM-dd HH:mm:ss:SSS

    def changeFormat(self):
        return self

    def getTableName(self):
        return "strategy_recommend_order"

    def getTableFieldMap(self):
        tableFieldMap={
            "id":"id",
            "realTransactionId":"real_transaction_id",
            "tradeDate":"trade_date",
            "quotationTime":"quotation_time",
            "totalBalance":"total_balance",
            "symbol":"symbol",
            "market":"market",
            "recommendPos":"recommend_pos",
            "recommendBalance":"recommend_balance",
            "price":"price",
            "recommendVol":"recommend_vol",
            "standardVol":"standard_vol",
            "status":"status",
            "entryTime":"entry_time",
        }
        return tableFieldMap



    def __str__(self):
        descDict = self.__dict__
        return """StrategyRecommendOrder-----{desc}""".format(
            desc=",".join(
                ["{key}:{val}".format(key=key, val=val.encode("utf-8") if isinstance(val, unicode) else val) for
                 key, val in descDict.items()])
        )